class_name Interactable
extends Area2D

signal interacted

var is_mouse_entered: bool = false

func _init() -> void:
	collision_layer = 0
	collision_mask = 0
	set_collision_mask_value(2, true)
	
	body_entered.connect(_on_body_entered)
	print("可互动物品初始化")

func interact() -> void:
	interacted.emit()
	#print("[Interact] %s" % name)

func _on_body_entered(_body: Node2D) -> void:
	interact()
